use serde::{Deserialize, Serialize};

#[derive(Deserialize, Serialize, Debug)]
pub struct Databases {
    pub databases: Vec<Database>
}

#[derive(Deserialize, Serialize, Debug)]
pub struct Database {
    pub id: String,
    #[serde(rename = "type")]
    pub x_type: String,
    pub description: Option<String>,
    pub name: String,
    #[serde(rename = "createdAt")]
    pub created_at: String,
    #[serde(rename = "updatedAt")]
    pub updated_at: String
}

pub mod real_time_db;
pub mod query;

#[cfg(test)]
mod tests {
    use crate::db::real_time_db::RealTimeDatabase;
    
    #[tokio::test]
    async fn test1() {
        RealTimeDatabase::json(String::from(r#"{"json":1}"#)).tags_by_db().await;
    }
}